package com.swu.pad.assignment.service;

import java.util.List;
import java.util.Map;

import com.swu.pad.assignment.entity.AsmtDocumentTptItem;
import com.swu.pad.assignment.entity.Assignment;
import com.swu.pad.assignment.entity.AssignmentDocumentTpt;
import com.swu.pad.assignment.entity.AssignmentPad;
import com.swu.pad.course.entity.CourseGroupUser;
import com.swu.pad.course.entity.Group;

public interface AssignmentService {

	/**
	 * 添加作业（同时创建pad）
	 * @param assignment
	 * @return
	 */
	public Assignment addAssignment(Assignment assignment);

	/**
	 * 修改作业
	 * @param assignment
	 */
	public Assignment updateAssignment(Assignment assignment);

	/**
	 * 删除作业
	 * @param assignmentId
	 */
	public void deleteAssignment(String assignmentId);

	/**
	 * 获取课程作业列表
	 * @param courseId
	 * @return
	 */
	public List<Assignment> getAssignmentByCourseId(String courseId);

	public Assignment getAssignment(String assignmentId);

	/**
	 * 获取作业详情（作业详情，完成的作业）
	 * @param assignmentId
	 * @return
	 */
	public Map<String, Object> getAssignmentDetail(String assignmentId);

	public AssignmentPad getUserAssignmentPad(String assignmentId, String groupId);

	public CourseGroupUser getUserAssignmentSession(String assignmentId, String userId);

	public String getAssignmentPadCurrentId(String assignmentId, String groupId);

	/**
	 * 获取user互评阶段需要评论的pad
	 * @param activityId
	 * @param userId
	 * @return
	 */
	public Map<String, Object> getCommentAssignmentPad(String activityId, String userId);

	/**
	 * 是否拥有小组作业
	 * @param courseId
	 * @return
	 */
	public boolean hasGroupAssignment(String courseId);

	/**
	 * 是否拥有个人作业
	 * @param courseId
	 * @return
	 */
	public boolean hasSingleAssignment(String courseId);

	/**
	 * 获取作业的所有小组
	 * @param assignmentId
	 * @return
	 */
	public List<Group> getAssignmentGroup(String assignmentId);

	/**
	 * 更换作业pad
	 * @param assignmentId
	 * @param groupId
	 */
	public void replacePad(String assignmentId, String groupId);
    //创建作业目录
	public void saveAsmtDocumentTpt(AssignmentDocumentTpt asmtDocumentTpt);
   //获取所有作业文档目录
	public List<AssignmentDocumentTpt> getAsmtDocumentTpts();
   //删除一个目录
	public void deleteAsmtDocumentTpt(String templateId);
   //保存文档
	public void saveAsmtDocumentTptItem(AsmtDocumentTptItem asmtDocumentTptItem);
   //目录下 条目
	public List<AsmtDocumentTptItem> getAsmtDocumentTptItems(String templateId);
   //删除一个条目
	public void deleteAsmtDocumentTptItem(String itemId);
   //获取 作业下关联文档
	public List<AsmtDocumentTptItem> getAsmtDocuments(String assignmentId);
}
